<?php

declare(strict_types=1);

namespace App\Model\Setting;

use Hyperf\DbConnection\Model\Model;

/**
 *  官方回复
 */
class SettingOfficialChat extends Model
{
    protected $table = 'official_chat_question';

    static function getAnswerByKey($key = '')
    {
        $where = [
            'key_word' => $key,
            'flag' => 1
        ];
        $item = self::where($where)->first();
        return $item ? $item->offcial_answer : '';
    }
}
